const mysql = require("mysql");

const connection = mysql.createConnection({
    port: 3306,
    user: "root",
    password: "zaqxsw",
    host: "localhost",
    database: "stu"
})

connection.connect((err) => {
    if (err) {
        console.log("connect error: " + err);
        return;
    }

    console.log("数据库连接成功！");
})

module.exports = connection;